// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import "Language.js" as Language

Rectangle {
    id: parentRect
    width: 1280
    height: 720
    property string lang: settings1.langID
    onStateChanged: {lang=settings1.langID; dock1.parentState=parentRect.state;}
    MouseArea{
        id: mousearea2
        x:0;y:0;height:parent.height;width:parent.width
        onClicked:{
            console.log("Current state = " + parentRect.state);
            if(parentRect.state=="STANDBY")parentRect.state = "LOGIN";
            else if(parentRect.state=="LOGIN")return;
            else if(parentRect.state=="MIRROR") parentRect.state="STANDBY";
            else if(parentRect.state=="GUEST") parentRect.state="STANDBY";
            else parentRect.state="MAIN";
        }

        ClockAlarm {
            id: clockalarm1
            x: 570
            y: 290
            opacity: 0
            onOpacityChanged: clockalarm1.lang = parentRect.lang;
        }

        Rectangle {
            id: userCamera
            x: 242
            y: 152
            width: 200
            height: 200
            color: "#ffffff"
            radius:5
            opacity: 0
            Rectangle{
                id: rectangle1
                height:100;width:100;
                color: "#5D92B1";
                MouseArea{
                    x:0;y:0;width:parent.width;height:parent.height;
                    onClicked:{userCamera.opacity = 0;}
                }

                Text{
                    text: if(settings1.langID == 1) "Take User Picture";
                    anchors.horizontalCenter: parent.horizontalCenter;
                    anchors.verticalCenter: parent.verticalCenter;
                    font.pixelSize: 32
                }
            }
        }

        Settings {
            id: settings1
            x: 8
            y: 16
            opacity: 0
        }
    }

    //timer for clock purposes
    property variant now: new Date()
    Timer {
        id: clock_timer
        interval: 1000
        repeat: true
        running: true
       onTriggered: {
            parentRect.now = new Date()
        }
    }


    color: "#bfbfbf"
    state: "STANDBY"

    DayViewWidget {
        id: dayviewwidget1
        x: 575
        y: 247
        opacity: 0
        onOpacityChanged: dayviewwidget1.lang = parentRect.lang;
        onOpenFullCalendar: {parentRect.state="CALENDAR"}
    }
    UserLogInWidget {
        id: userloginwidget1
        x: 543
        y: 255
        opacity: 0
        onUserSelected: {parentRect.state = "MAIN"; console.log("User Logged In");}
        onAddUserClicked: {userCamera.opacity=1;}
    }
    TimeWidget {
        id: timewidget1
        x: 515
        y: 6
        opacity: 0
        onOpenFullTime:{parentRect.state="CLOCK";}
    }

    Image {
        id: reflectiveLogo
        x: 329
        y: 6
        fillMode: Image.PreserveAspectFit
        source: "Assets/reflectiveLogo.png"
    }

    Clock {
        id: clock
        x: 82
        y: 430
        anchors.verticalCenterOffset: 160
        anchors.horizontalCenterOffset: -468
        anchors.centerIn: parent
        hours: parentRect.now.getHours()
        minutes: parentRect.now.getMinutes()
        seconds: parentRect.now.getSeconds()
        day: Qt.formatDateTime(parentRect.now, "dd")
        ampm: Qt.formatDateTime(parentRect.now, "ap")

    }

    Text {
        id: clockText_standby
        x: 27
        y: 652
        text: qsTr("Friday, May 5th 2012")
        font.pixelSize: 36
        opacity: 1
    }

    Text{
        id:helpText_standby
        x: 376
        y: 500
        text: qsTr("Touch To Begin")
        font.family: "Georgia"
        anchors.verticalCenterOffset: 138
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        font.pixelSize: 36
    }

    MusicWidget {
        id: musicwidget1
        x: 208
        y: 430
        opacity: 0
    }
    /*
    WeatherMovable{
        id: weatherWidget
        x: 0
        y: 0
        opacity: 0

    }*/

    Gallery {
        id: gallery
        x: 329
        y: 232
        opacity: 0
        onOpacityChanged: gallery.lang=parentRect.lang;
    }

    HealthWidget {
        id: healthwidget1
        x: 12
        y: 292
        opacity: 0
        onOpacityChanged: {healthwidget1.lang = parentRect.lang}
}
        Calendar {
            id: calendar1
            x: 600
            y: -187
            opacity: 0
            onOpacityChanged: {calendar1.lang = parentRect.lang}
        }

        Radio {
            id: radio1
            x: 510
            y: -207
            opacity: 0
        }


    MusicFullScreen {
        id: musicfullscreen1
        x: 484
        y: 217
        opacity: 0
        onOpacityChanged: musicfullscreen1.lang = parentRect.lang
        onUpdateMusicWidget:{ musicfullscreen1.lang=parentRect.lang; musicwidget1.updateMusic();}
    }

    Rectangle {
        id: loginGuestButton
        x: 881
        y: 375
        width: 200
        height: 50
        color: "#00CC33"
        opacity: 0
        radius: 5
        Text{
            id: text1
            text: {if(Language.getLangID() == 1)"GUEST";}
            color:"white"
            font.pixelSize: 32
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
        }
        MouseArea{
            id: mousearea1
            x:0;y:0;height:parent.height;width:parent.width;
            onClicked:{parentRect.state="GUEST";}
        }
    }

    Rectangle {
        id: loginMirrorOnlyButton
        x: 881
        y: 455
        width: 200
        height: 50
        color: "#FF0033"
        opacity: 0
        radius:5
        Text{
            id: text2
            text: {if(Language.getLangID() == 1)"MIRROR";}
            color:"white"
            font.pixelSize: 32
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
        }

        MouseArea{
            id: mousearea3
            x:0;y:0;height:parent.height;width:parent.width;
            onClicked:{parentRect.state="MIRROR";}
        }
    }

    WeatherWidget {
        id: weatherwidget1
        x: 453
        y: 281
        opacity: 0
        onOpacityChanged: weatherwidget1.langID = parentRect.lang;
        onOpenFullWeather: {weatherwidget1.langID=langID;parentRect.state="WEATHER";}
    }

    HealthFullScreen {
        id: healthfullscreen1
        x: 292
        y: 26
        opacity: 0
        onOpacityChanged: healthfullscreen1.lang = parentRect.lang
    }

    WeatherMovable {
        id: weathermovable1
        x: 442
        y: 30
        opacity: 0
        onOpacityChanged: {weathermovable1.langID=lang;}
    }

    Camera {
        id: camera1
        x: 5
        y: 55
        opacity: 0
        onOpenFullGallery: {parentRect.state="GALLERY";}
    }

    Dock3 {
        id: dock1
        anchors.horizontalCenter: parentRect.horizontalCenter
        opacity: 0
        onGoToCamera: {parentRect.state="CAMERA";}
        onGoToEmail: {parentRect.state="EMAIL";}
        onGoToGallery: {parentRect.state="GALLERY";}
        onGoToMaps:{parentRect.state="MAPS";}
        onGoToPower: {parentRect.state="NEWS";}
        onGoToRadio:  {parentRect.state="RADIO";}
        onGoToSettings: {parentRect.state="SETTINGS";}



    }
    EmailMovable {
        id: emailmovable1
        x: 317
        y: 39
        opacity: 0
    }
    Map {
        id: map1
        x: 342
        y: 105
        opacity: 0
    }

    NewsMovable {
        id: newsmovable1
        x: 474
        y: 69
        opacity: 0
    }

    states: [
        State {
               name: "STANDBY"
              // PropertyChanges { target: signal; color: "green"}
              // PropertyChanges { target: flag; state: "FLAG_DOWN"}
           },
           State {
               name: "LOGIN"
               PropertyChanges {target:clock; opacity:0}
               PropertyChanges {target:clockText_standby; opacity:0}
               PropertyChanges {target:helpText_standby; opacity:0}
               PropertyChanges {target:reflectiveLogo; opacity:0}

               PropertyChanges {
                   target: userloginwidget1
                   x: 511
                   y: 43
                   z: 1
                   opacity: 1
               }

               PropertyChanges {
                   target: loginGuestButton
                   opacity: 1
               }

               PropertyChanges {
                   target: loginMirrorOnlyButton
                   opacity: 1
               }

               PropertyChanges {
                   target: userCamera
                   x: 31
                   y: 37
                   width: 400
                   height: 400
                   z: 9
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea2
                   x: 0
                   y: 0
               }

               PropertyChanges {
                   target: rectangle1
                   x: 60
                   y: 326
                   width: 280
                   height: 50
                   radius: 3
               }

           },
           State {
               name: "MAIN"
               PropertyChanges {target:clock; opacity:0}
               PropertyChanges {target:clockText_standby; opacity:0}
               PropertyChanges {target:helpText_standby; opacity:0}
               PropertyChanges {target:reflectiveLogo; opacity:0}

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
                   onOpenFullMusic:{parentRect.state="MUSIC"; }
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }
               PropertyChanges {
                   target: mousearea1
                   x: 0
                   y: 0
                   opacity: 0
                   anchors.topMargin: 0
                   anchors.rightMargin: 0
                   anchors.bottomMargin: 0
                   anchors.leftMargin: 0
               }

               PropertyChanges {
                   target: healthwidget1
                   x: 12
                   y: 363
                   width: 250
                   height: 208
                   opacity: 1
                   onOpenFullHealth:{parentRect.state="HEALTH"; }

               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 47
                   opacity: 1
               }
               PropertyChanges {
                   target: dayviewwidget1
                   x: 5
                   y: 167
                   anchors.verticalCenterOffset: -104
                   anchors.horizontalCenterOffset: -530
                   opacity: 1
               }

               PropertyChanges {
                   target: mousearea2
                   x: 12
                   y: 8
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   z: 0
                   opacity: 1
               }

               PropertyChanges {
                   target: text1
                   opacity: 0
               }

               PropertyChanges {
                   target: text2
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea3
                   opacity: 0
               }

               PropertyChanges {
                   target: text3
                   opacity: 1
               }

               PropertyChanges {
                   target: news1
                   opacity: 0
               }
           },
           State {
               name: "GALLERY"
               PropertyChanges{
                   target: gallery
                   x: 133
                   y: 1
                   opacity:1
               }

               PropertyChanges {
                   target: clock
                   opacity: 0
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea2
                   x: 0
                   y: 0
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 0
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }
           },
           State {
               name: "MUSIC"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }


               PropertyChanges {
                   target: musicfullscreen1
                   x: 451
                   y: 0
                   height: 400
                   opacity: 1
               }

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
                   onOpenFullMusic:{parentRect.state="MUSIC"; }
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }
               PropertyChanges {
                   target: mousearea1
                   x: 0
                   y: 0
                   anchors.topMargin: 0
                   anchors.rightMargin: 0
                   anchors.bottomMargin: 0
                   anchors.leftMargin: 0
               }

               PropertyChanges {
                   target: healthwidget1
                   x: 12
                   y: 363
                   width: 250
                   height: 208
                   opacity: 1
                   onOpenFullHealth:{parentRect.state="HEALTH"; }

               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 47
                   opacity: 1
               }

               PropertyChanges {
                   target: dayview1
                   opacity: 1
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: 5
                   y: 167
                   anchors.verticalCenterOffset: -104
                   anchors.horizontalCenterOffset: -530
                   opacity: 1
               }

               PropertyChanges {
                   target: mousearea2
                   x: 12
                   y: 8
               }
           },
           State {
               name: "GUEST"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: userloginwidget1
                   x: "511"
                   y: "43"
                   opacity: 0
               }

               PropertyChanges {
                   target: loginGuestButton
                   opacity: 0
               }

               PropertyChanges {
                   target: loginMirrorOnlyButton
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea2
                   x: 0
                   y: 0
               }

               PropertyChanges {
                   target: mousearea1
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 69
                   opacity: 1
               }
           },
           State {
               name: "MIRROR"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   x: 329
                   y: 0
                   opacity: 1
               }

               PropertyChanges {
                   target: userloginwidget1
                   x: "511"
                   y: "43"
                   opacity: 0
               }

               PropertyChanges {
                   target: loginGuestButton
                   opacity: 0
               }

               PropertyChanges {
                   target: loginMirrorOnlyButton
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea1
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea2
                   x: 0
                   y: 0
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }
           },
           State {
               name: "HEALTH"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: userloginwidget1
                   x: "511"
                   y: "43"
                   opacity: 0
               }

               PropertyChanges {
                   target: loginGuestButton
                   opacity: 0
               }

               PropertyChanges {
                   target: loginMirrorOnlyButton
                   opacity: 0
               }

               PropertyChanges {
                   target: healthwidget1
                   x: 12
                   y: 363
                   width: 250
                   height: 208
                   opacity: 1
                   onOpenFullHealth:{parentRect.state="HEALTH"; }

               }


               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 47
                   opacity: 1
               }
               PropertyChanges {
                   target: dayviewwidget1
                   x: 5
                   y: 167
                   anchors.verticalCenterOffset: -104
                   anchors.horizontalCenterOffset: -530
                   opacity: 1
               }

               PropertyChanges {
                   target: healthfullscreen1
                   x: 337
                   y: 68
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }
           },
           State {
               name: "CALENDAR"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: "1"
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: "1"
               }

               PropertyChanges {
                   target: mousearea1
                   x: "0"
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: "1"
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 47
                   opacity: "1"
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: "1"
               }

               PropertyChanges {
                   target: mousearea2
                   x: "12"
                   y: "8"
               }

               PropertyChanges {
                   target: calendar1
                   x: 409
                   y: -278
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   x: 142
                   y: 0
                   anchors.horizontalCenterOffset: 2
                   opacity: 1
               }
           },
           State {
               name: "WEATHER"

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: 0
               }

               PropertyChanges {
                   target: clock
                   opacity: 0
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: weathermovable1
                   x: 461
                   y: 55
                   opacity: 1
               }

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }
               PropertyChanges {
                   target: mousearea1
                   x: 0
                   y: 0
                   anchors.topMargin: 0
                   anchors.rightMargin: 0
                   anchors.bottomMargin: 0
                   anchors.leftMargin: 0
               }

               PropertyChanges {
                   target: healthwidget1
                   x: 12
                   y: 363
                   width: 250
                   height: 208
                   opacity: 1
                   onOpenFullHealth:{parentRect.state="HEALTH"; }

               }

               PropertyChanges {
                   target: weatherwidget1
                   x: 5
                   y: 47
                   opacity: 1
               }
               PropertyChanges {
                   target: dayviewwidget1
                   x: 5
                   y: 167
                   anchors.verticalCenterOffset: -104
                   anchors.horizontalCenterOffset: -530
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }

           },
           State {
               name: "CAMERA"
               PropertyChanges {
                   target: reflectiveLogo
                   opacity: 0
               }

               PropertyChanges {
                   target: clock
                   opacity: 0
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: weathermovable1
                   x: 442
                   y: 30
                   opacity: 0
               }

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 0
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 0
               }

               PropertyChanges {
                   target: mousearea1
                   x: 0
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: 0
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: 0
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: 0
               }

               PropertyChanges {
                   target: camera1
                   x: 0
                   y: -117
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }
           },
           State {
               name: "CLOCK"
               PropertyChanges {
                   target: reflectiveLogo
                   opacity: 0
               }

               PropertyChanges {
                   target: clock
                   opacity: 0
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: weathermovable1
                   x: 442
                   y: 30
                   opacity: 0
               }

               PropertyChanges {
                   target: musicwidget1
                   x: 0
                   y: 617
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

               PropertyChanges {
                   target: mousearea1
                   x: 0
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: 1
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: 1
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: 1
               }

               PropertyChanges {
                   target: camera1
                   x: 0
                   y: 2
                   opacity: 0
               }

               PropertyChanges {
                   target: clock1
                   opacity: 1
               }

               PropertyChanges {
                   target: clockalarm1
                   x: 482
                   y: 110
                   opacity: 1
               }

               PropertyChanges {
                   target: dock1
                   x: 142
                   y: 2
                   anchors.horizontalCenterOffset: 2
                   opacity: 1
               }
           },
           State {
               name: "SETTINGS"
               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: weathermovable1
                   x: "442"
                   y: "30"
                   opacity: "0"
               }

               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: "0"
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: "0"
               }

               PropertyChanges {
                   target: mousearea1
                   x: "0"
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: "0"
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: "0"
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: "0"
               }

               PropertyChanges {
                   target: camera1
                   x: "0"
                   y: "2"
                   opacity: 0
               }

               PropertyChanges {
                   target: dock1
                   opacity: 0
               }

               PropertyChanges {
                   target: settings1
                   x: 0
                   y: 0
                   opacity: 1
               }
           },
           State {
               name: "RADIO"
               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: weathermovable1
                   x: "442"
                   y: "30"
                   opacity: "0"
               }

               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

               PropertyChanges {
                   target: mousearea1
                   x: "0"
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: 1
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: 1
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: 1
               }

               PropertyChanges {
                   target: camera1
                   x: "0"
                   y: "2"
                   opacity: 0
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }

               PropertyChanges {
                   target: settings1
                   x: 0
                   y: 0
                   opacity: 0
               }

               PropertyChanges {
                   target: radio1
                   x: 521
                   y: -122
                   opacity: 1
               }
           },
           State {
               name: "MAPS"
               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }

               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: weathermovable1
                   x: "442"
                   y: "30"
                   opacity: "0"
               }

               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

               PropertyChanges {
                   target: mousearea1
                   x: "0"
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
               }

               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: 1
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: 1
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: 1
               }

               PropertyChanges {
                   target: camera1
                   x: "0"
                   y: "2"
                   opacity: 0
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }

               PropertyChanges {
                   target: settings1
                   x: 0
                   y: 0
                   opacity: 0
               }

               PropertyChanges {
                   target: radio1
                   x: 521
                   y: -122
                   opacity: 0
               }

               PropertyChanges {
                   target: map1
                   opacity: 1
               }
           },
           State {
               name: "NEWS"
               PropertyChanges {
                   target: clock
                   opacity: "0"
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: "0"
               }

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: "0"
               }



               PropertyChanges {
                   target: timewidget1
                   opacity: "1"
               }

               PropertyChanges {
                   target: mousearea1
                   x: "0"
                   y: "0"
                   anchors.topMargin: "0"
                   anchors.rightMargin: "0"
                   anchors.bottomMargin: "0"
                   anchors.leftMargin: "0"
                   opacity: "0"
               }
               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: "1"
               }
               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: "1"
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: "1"
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: "1"
               }

               PropertyChanges {
                   target: mousearea2
                   x: "12"
                   y: "8"
               }

               PropertyChanges {
                   target: dock1
                   z: "100"
                   opacity: "1"
               }

               PropertyChanges {
                   target: text1
                   opacity: "0"
               }

               PropertyChanges {
                   target: text2
                   opacity: "0"
               }

               PropertyChanges {
                   target: mousearea3
                   opacity: "0"
               }

               PropertyChanges {
                   target: text3
                   opacity: "1"
               }

               PropertyChanges {
                   target: news1
                   x: 448
                   y: 66
                   opacity: 1
               }

               PropertyChanges {
                   target: newsmovable1
                   opacity: 1
               }
           },
           State {
               name: "EMAIL"

               PropertyChanges {
                   target: reflectiveLogo
                   opacity: 0
               }

               PropertyChanges {
                   target: helpText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: clock
                   opacity: 0
               }

               PropertyChanges {
                   target: clockText_standby
                   opacity: 0
               }

               PropertyChanges {
                   target: dock1
                   opacity: 1
               }

               PropertyChanges {
                   target: weathermovable1
                   opacity: 0
               }

               PropertyChanges {
                   target: musicwidget1
                   x: "0"
                   y: "617"
                   opacity: "1"
               }
               PropertyChanges {
                   target: healthwidget1
                   x: "12"
                   y: "363"
                   width: "250"
                   height: "208"
                   opacity: "1"
               }

               PropertyChanges {
                   target: weatherwidget1
                   x: "5"
                   y: "47"
                   opacity: "1"
               }

               PropertyChanges {
                   target: dayviewwidget1
                   x: "5"
                   y: "167"
                   anchors.horizontalCenterOffset: "-530"
                   anchors.verticalCenterOffset: "-104"
                   opacity: "1"
               }

               PropertyChanges {
                   target: mousearea2
                   x: "12"
                   y: "8"
               }

               PropertyChanges {
                   target: dock1
                   z: "100"
                   opacity: "1"
               }

               PropertyChanges {
                   target: emailmovable1
                   x: 336
                   y: 125
                   opacity: 1
               }

               PropertyChanges {
                   target: timewidget1
                   opacity: 1
               }

           }
       ]
}
